package com.woniuxy01;

import java.util.Scanner;

public class Test06 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入自变量x");
        int x = scanner.nextInt();
        int y;
//        if(x>0){
//           y=1;
//        }else if(x==0) {
//            y=0;
//        }else{
//            y=-1;
//        }

        if(x>=0){
            if(x>0){
                y=1;
            }else{
                y=0;
            }
        }else{
            //x<0
            y=-1;
        }


        System.out.println("x="+x+",y="+y);
    }
}